package semana2.bucles.ejercicio02;

import java.util.Scanner;

public class Ej02 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		System.out.println("Introduce n1: ");
		int n1 = scan.nextInt();
		System.out.println("Introduce n2: ");
		int n2 = scan.nextInt();

		if (n1 < n2) {

			while (n1 <= n2) {
				System.out.print(n1 + " ");
				n1++;
			}

		} else {
			for (int i = n2; n2 <= n1; n2++) {
				System.out.print(n2 + " ");
			}
		}

	}

}
